<?php
/**
 * 表模型 vod 
 * @copyright reginx.com
 * @Created By Reginx tab tool
 */
class vod_tab extends tab {
    
    /**
     * 过滤规则
     *
     * @var unknown_type
     */
    public $filter   = array(
        'id'        => array('filter' , 'int'),
        'name'      => array('filter' , 'text'),
        'sname'     => array('filter' , 'text'),
        'cover'     => array('filter' , 'text'),
        'lang'      => array('filter' , 'int'),
        'rec'       => array('filter' , 'int'),
        'desc'      => array('filter' , 'text'),
        'key'       => array('filter' , 'text'),
        'mosaics'   => array('filter' , 'int'),
        'director'  => array('filter' , 'text'),
        'actor'     => array('filter' , 'text'),
        'region'    => array('filter' , 'int'),
        'cat'       => array('filter' , 'int'),
        'release'   => array('filter' , 'timestamp'),
        'udate'     => array('filter' , 'int'),
        'status'    => array('filter' , 'int'),
        'views'     => array('filter' , 'int'),
        'plays'     => array('filter' , 'int'),
        'tpl'       => array('filter' , 'int'),
        'top'       => array('filter' , 'int'),
        'tread'     => array('filter' , 'int'),
        'score'     => array('filter' , 'int'),
        'info'      => array('filter' , 'html'),
    );
    
    /**
     * 默认值
     *
     * @var unknown_type
     */
    public $default  = array(
        'cover'     => 'images/null.gif',
        'lang'      => 0,
        'rec'       => 0,
        'desc'      => '',
        'key'       => '',
        'mosaics'   => 0,
        'director'  => '佚名',
        'actor'     => '佚名',
        'region'    => 0,
        'cat'       => 0,
        'release'   => 0,
        'udate'     => REQUEST_TIME,
        'status'    => 0,
        'views'     => 0,
        'plays'     => 0,
        'tpl'       => 0,
        'top'       => 0,
        'tread'     => 0,
        'score'     => 0,
        'info'      => '暂无',
    );
    
    
    /**
     * 验证规则
     *
     * @var unknown_type
     */
    public $validate = array(
        array(
            'key'       => 'name',
            'type'      => 0,
            'rule'      => 'require',
            'msg'       => '请输入视频名称'
        ),
        array(
            'key'       => 'cat',
            'type'      => 0,
            'rule'      => 'number',
            'msg'       => '请选择类别'
        ),
        array(
            'key'       => 'key',
            'type'      => 1,
            'rule'      => '/^.{1,255}$/s',
            'msg'       => '关键字长度请勿超过250字节'
        ),
        array(
            'key'       => 'desc',
            'type'      => 1,
            'rule'      => '/^.{1,255}$/s',
            'msg'       => '描述信息长度请勿超过250字节'
        )
    );
    
}
?>